import matplotlib.pyplot as plt

# x = range(0,40,2)
# y = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]
#
# plt.plot(x,y)
# plt.show()

#图片设置
fig = plt.figure(figsize=(10,6), dpi=80)

#>>> range(0, 30, 5)  # 步长为 5
#[0, 5, 10, 15, 20, 25]
x = range(0,40,2)
y = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]

plt.plot(x,y)

#x 刻度
plt.xticks(range(0,40,2))

#y 刻度
plt.yticks(y)

plt.savefig('./imgs/test.png')

plt.show()